// @APIVersion 1.0.0
// @Title beego Test API
// @Description beego has a very cool tools to autogenerate documents for your API
// @Contact astaxie@gmail.com
// @TermsOfServiceUrl http://beego.me/
// @License Apache 2.0
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
package routers

import (
	"qkleague/controllers"

	"github.com/astaxie/beego"
)

func init() {
	beego.Router("/", &controllers.DefaultController{})
	beego.Router("/*", &controllers.DefaultController{})

	ns := beego.NewNamespace("/v1",
		beego.NSNamespace("/account",
			beego.NSInclude(&controllers.UserInfoController{}),
		),
	)
	beego.AddNamespace(ns)

	accountNS := beego.NewNamespace("/v1",
		beego.NSInclude(&controllers.AccountController{}),
	)
	beego.AddNamespace(accountNS)

	washerNS := beego.NewNamespace("/washer",
		beego.NSInclude(&controllers.WasherController{}),
	)
	beego.AddNamespace(washerNS)

	washroomNS := beego.NewNamespace("/washroom",
		beego.NSInclude(&controllers.WashroomController{}),
	)
	beego.AddNamespace(washroomNS)

	statisNS := beego.NewNamespace("/statis",
		beego.NSInclude(&controllers.StatisController{}),
	)
	beego.AddNamespace(statisNS)

	admin := beego.NewNamespace("/admin",
		beego.NSInclude(&controllers.AdminController{}),
	)
	beego.AddNamespace(admin)
}
